package com.sanyang.lawyer.entity;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.List;

public class Clientpage implements Serializable {
    private static final long serialVersionUID = -142031967131915765L;

    public Clientpage(Object obj, HttpServletRequest request) {
        this.total = 0;
        this.pageNo = Integer.parseInt(request.getParameter("page"));
        this.pageStart = (Integer.parseInt(request.getParameter("page")) - 1) * Integer.parseInt(request.getParameter("limit"));
        this.pageEnd = Integer.parseInt(request.getParameter("page")) * Integer.parseInt(request.getParameter("limit"));
        this.pageSize = Integer.parseInt(request.getParameter("limit"));
        this.rows = null;
        this.obj = obj;
    }

    /**
     * 总记录数
     */
    private int total;

    /**
     * 当前的页数
     */
    private int pageNo;

    /**
     * 记录开始数
     */
    private int pageStart;

    /**
     * 记录结束数
     */
    private int pageEnd;

    /**
     * 每页显示的记录数
     */
    private int pageSize;

    /**
     * 列表数据
     */
    private List<?> rows;

    /**
     * 业务对象
     */
    private Object obj;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageStart() {
        return pageStart;
    }

    public void setPageStart(int pageStart) {
        this.pageStart = pageStart;
    }

    public int getPageEnd() {
        return pageEnd;
    }

    public void setPageEnd(int pageEnd) {
        this.pageEnd = pageEnd;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public List<?> getRows() {
        return rows;
    }

    public void setRows(List<?> rows) {
        this.rows = rows;
    }

    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }
}
